package com.mars.module.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.mars.module.system.entity.BaseEntity;

import java.time.LocalDateTime;

/**
 * 药品对象 sys_drug
 *
 * @author mars
 * @date 2024-05-15
 */

@Data
@ApiModel(value = "药品对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_drug")
public class SysDrug   {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 名字
     */
    @Excel(name = "名字")
    @ApiModelProperty(value = "名字")
    private String name;
    /**
     * 药品分类
     */
    @Excel(name = "药品分类")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "药品分类")
    private Long drugType;

    @TableField(exist = false)
    @ApiModelProperty(value = "药品分类")
    private String drugTypeName;
    /**
     * 是否危险药品
     */
    @Excel(name = "是否危险药品")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "是否危险药品")
    private Long isPrescription;


    @TableField(exist = false)
    @ApiModelProperty(value = "是否危险药品")
    private String isPrescriptionName;
    /**
     * 用法用途
     */
    @Excel(name = "用法用途")
    @ApiModelProperty(value = "用法用途")
    private String drugUsage;
    /**
     * 药品功能
     */
    @Excel(name = "药品功能")
    @ApiModelProperty(value = "药品功能")
    private String mainTreat;
    /**
     * 位置
     */
    @Excel(name = "位置")
    @ApiModelProperty(value = "位置")
    private String location;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人ID")
    private Long createById;
}
